package com.erbao.dp.state.v1;

/**
 * 一般写法
 * @author CaoBaoYin
 * @since 21/10/18 14:57
 */
public class MM {
    String name;
    private enum MmState{HAPPY, SAD}
    MmState mmState;

    public void smile() {
        // switch-case
        switch (mmState) {
            case HAPPY://笑的灿烂
            case SAD: //苦笑
        }
    }
    public void cry() {
        // switch-case
        switch (mmState) {
            case HAPPY://笑出泪花
            case SAD:  //悲伤哭泣
        }
    }
    public void say() {
        // switch-case
        switch (mmState) {
            case HAPPY://好声好气地说
            case SAD:  //恶言恶语地说
        }
    }
}
